﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace TibcoWinform
{
   public class ControlHelper
    {
        public static void InvokeIfNeeded(Control ctr, Action act)
        {
            if (ctr.InvokeRequired)
            {
                ctr.Invoke(act);
            }
            else
                act();
        }
    }
}
